<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.ibm.icu.text.SimpleDateFormat"%>
<%@ page import="hmg.common.ValueHolder"%>
<%@ page import="hmg.common.CommonUtils"%>
<%@ page import="java.util.Locale"%>
<%@ page import="hmg.vo.BoardVO"%>
<%@ page import="java.util.List"%>
<%-- 
    JSP Name : jspName.jsp
    Description : 설명을 기술합니다.
    author Kim hyung soo
    since 2012. 10. 15.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 10. 15.     Kim hyung soo     최초 생성
--%>
<%
    BoardVO rssInfo = (BoardVO) request.getAttribute("RssInfo");
    List<BoardVO> itemList = (List<BoardVO>) request.getAttribute("ItemList");

    SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd", Locale.US);
%>
<rss version="2.0">
    <channel>
        <title><%= rssInfo.getTitle() %></title>
        <link><%= ValueHolder.SERVER_DOMAIN + rssInfo.getLink1() %></link>
        <description><%= rssInfo.getWebContent() %></description>
<%
    for (int idx = 0; idx < itemList.size(); idx++) {
        BoardVO item = itemList.get(idx);
%>
        <item>
            <title><%= CommonUtils.getRSSText(item.getTitle()) %></title>
            <description>
<%      if (item.getWebContent() != null) { %>
                <%= CommonUtils.getRSSText(item.getWebContent()) %>
<%      } %>
            </description>
            <link><%= item.getLink1() %></link>
            <author>Hyundai Motor Group</author>
            <pubDate><%= item.getEffectDate() %></pubDate>
<%      if (item.getThumbnailImage() != null) { %>
            <enclosure url="<%= ValueHolder.SERVER_DOMAIN + item.getThumbnailImage() %>" type="image/jpeg"></enclosure>
<%      } %>
        </item>
<%  } %>
    </channel>
</rss>